cmake_minimum_required(VERSION 3.12.4)

if(NOT ESP_PLATFORM)
  project(lvgl HOMEPAGE_URL https://github.com/lvgl/lvgl)
endif()

set(LVGL_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})

if(ESP_PLATFORM)
  include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/esp.cmake)
  set(COMPONENT_SRCS "porting/lv_port_disp.c"
    "porting/lv_port_indev.c"
    "../lcd/lcd.c"
    "../main/button.c"
    "porting/lv_port_fs.c"
    "porting/lv_port_indev.c")
    set(COMPONENT_PRIV_INCLUDEDIRS  "."
                                "../lcd/include"
                                "../main/include"
                                "porting"
                                "src")
    set(COMPONENT_ADD_INCLUDEDIRS   .
    porting)
    
elseif(ZEPHYR_BASE)
  include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/zephyr.cmake)
elseif(MICROPY_DIR)
  include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/micropython.cmake)
else()
  include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/custom.cmake)
endif()
